package com.zzyx.service.impl;

import java.util.Collection;
import java.util.List;
import java.util.Map;

import org.hibernate.criterion.DetachedCriteria;

import com.zzyx.bean.Hospital;
import com.zzyx.bean.Keshi;
import com.zzyx.dao.KeshiDAO;
import com.zzyx.service.KeshiService;

public class KeshiServiceImpl implements KeshiService {
	private KeshiDAO keshiDao;

	public KeshiDAO getKeshiDao() {
		return keshiDao;
	}

	public void setKeshiDao(KeshiDAO keshiDao) {
		this.keshiDao = keshiDao;
	}

	public void delete(Keshi entity) {
		keshiDao.delete(entity);
	}

	public void deleteAll(Collection<Keshi> c) {
		keshiDao.deleteAll(c);

	}

	public void deleteById(Class<Keshi> entityClass, Integer id) {
		keshiDao.deleteById(entityClass, id);
	}

	public List<Keshi> findAll(Class<Keshi> entityClass) {
		return keshiDao.findAll(entityClass);
	}

	public List<Keshi> findByAll(DetachedCriteria dc) {
		return keshiDao.findByAll(dc);
	}

	public List<Keshi> findByCriteria(DetachedCriteria dc, int firstResult,
			int maxResult) {
		return keshiDao.findByCriteria(dc, firstResult, maxResult);
	}

	public List<Keshi> findByCriteria(DetachedCriteria dc) {
		return keshiDao.findByCriteria(dc);
	}

	public List<Keshi> findByHql(String hql, Map<String, Object> param,
			int firstResult, int maxResult) {
		return keshiDao.findByHql(hql, param, firstResult, maxResult);
	}

	public Keshi findById(Class<Keshi> entityClass, Integer id) {
		return keshiDao.findById(entityClass, id);
	}

	public List<Keshi> findByProperty(Class<Keshi> entityClass,
			String propertyName, Object value, int type) {
		return keshiDao.findByProperty(entityClass, propertyName, value, type);
	}

	public Keshi findUniqueResult(String sql) {
		return keshiDao.findUniqueResult(sql);
	}

	public void save(Keshi entity) {
		keshiDao.save(entity);
	}

	public void saveOrUpdate(Keshi entity) {
		keshiDao.saveOrUpdate(entity);

	}

	public void update(Collection<Keshi> c) {
		keshiDao.update(c);

	}

	public void delete(String delKeshiIds)
	{
		keshiDao.delete(delKeshiIds);
		
	}
	public void update(Keshi keshi)
	{
		keshiDao.update(keshi);
	}

	
	public List<Keshi> findByHql(String hql) {
	
		return keshiDao.findByHql(hql);
	}

	
	public void save(String hospital, Keshi keshis) {
		keshiDao.save(hospital,keshis);
		
	}

	
	public void update(Keshi keshis, Hospital hospital) {
		keshiDao.update(keshis,hospital);
		
	}

	
	public List<Keshi> findByHql(String hql, int start, int max) {
		// TODO Auto-generated method stub
		return keshiDao.findByHql(hql, start, max);
	}

}
